package com.guiguli.TernaryOperator;

public class TernaryOperator {
    public static void main(String[] args) {
        System.out.println(10 > 20 ? "对" : "错");  // 和其他语言的三木运算符没什么区别
        int a = 1, b = 2, c = 3;
        int result = (a > b ? a : b) > c ? (a > b ? a : b) : c;
        System.out.println("最大值为" + result);
    }
}
